package org.yunai.swjg.server.module.inventory.command;

import org.springframework.stereotype.Component;
import org.yunai.swjg.server.core.service.GameMessageCommand;
import org.yunai.swjg.server.core.service.Online;
import org.yunai.swjg.server.module.inventory.ItemService;
import org.yunai.swjg.server.rpc.message.C_S.C_S_UnEquipReq;

import javax.annotation.Resource;

/**
 * 装备卸下命令
 * User: yunai
 * Date: 13-5-7
 * Time: 下午10:34
 */
@Component
public class UnEquipCommand extends GameMessageCommand<C_S_UnEquipReq> {

    @Resource
    private ItemService itemService;

    @Override
    public void execute(Online online, C_S_UnEquipReq msg) {
        itemService.unEquip(online, msg.getType().intValue());
    }
}
